package com.alm.handle.mq.Impl;

import com.alm.handle.core.domain.api.MsgEntity2;
import com.alm.handle.mq.ISysCommandService;
import com.alm.handle.mq.ProxyCommandService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class SysCommandServiceImpl implements ISysCommandService {

    @Resource private ProxyCommandService proxyCommandService;

    @Override
    public boolean sendMessage(MsgEntity2 message){
        return proxyCommandService.send(message.ctxId, message.data);
    }

    @Override
    public boolean sendDataBytype(String ctxId ,byte[] data) throws Exception {
        return proxyCommandService.sendByByte(ctxId, data);
    }
}
